package com.test;

import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class ArtistsActivity extends ListActivity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.mainb);
		TextView tv = (TextView) findViewById(R.id.text);
		tv.setText("This is ArtistsActivity");
		List<String> items = fillArray();
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
				android.R.layout.simple_expandable_list_item_1, items);

		this.setListAdapter(adapter);
	}

	private List<String> fillArray() {
		List<String> items = new ArrayList<String>();
		items.add("dog");
		items.add("cat");
		items.add("tiger");
		items.add("lion");
		items.add("cock");
		items.add("horse");
		items.add("pig");
		return items;
	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		Intent myIntentDial = new Intent(ArtistsActivity.this,
				AnimalActivity.class);
		ArtistsActivity.this.startActivity(myIntentDial);
	}
}